package com.open.pokergames.comm.repository.entity;

public enum ResultCode {

    SUCCESS(200, "成功"),
    PARAM_IS_INVALID(1001, "参数无效"),
    PARAM_IS_BLANK(1002, "必传参数为空"),
    PARAM_TYPE_BIND_ERROR(1003, "参数类型错误"),
    PARAM_NOT_COMPLETE(1004, "参数缺失"),
    USER_NOT_LOGGED_IN(2000, "用户未登录,访问的路径需要验证,请登录"),
    USER_LOGIN_ERROR(2001, "账号不存在或密码错误"),
    USER_LOGIN_ERROR_PASSWORD(2002, "密码错误"),
    USER_ACCOUNT__FORBIDDEN(2003, "账号已被禁用"),
    USER_NOT_EXIST(2004, "用户不存在"),
    USER_HAS_EXISTED(2005, "用户已存在"),
    SYS_ERROR(4000, "系统异常"),
    SYS_INVALID_SIGN(4001, "无效签名"),
    SYS_API_NOT_EXIST(4002, "API方法不存在"),
    SYS_INVALID_REQUEST_ERROR(4003, "请求方式 {0} 错误 ! 请使用 {1} 方式"),
    DATA_HAS_EXISTED(5000, "数据已存在");

    private Integer code;
    private String msg;

    private ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer code() {
        return this.code;
    }

    public String message() {
        return this.msg;
    }
}
